﻿using Newtonsoft.Json;

namespace GrailTechnology.AutoTags.Providers
{
    /* EXAMPLE
     *   {"memes":[{"source":"http://www.knallgrau.at/en",
           "updated":"Mon May 15 13:38:14 CEST 2006",
           "dimensions":{"title":["knallgrau | Company"],
           "topic":["knallgrau","twoday","platform","Contact","content",
           "software","management","blog","business","company"],
           "person":["Dieter Rappold"],
           "size":["7047"],
           "content-type":["text/html"],
           "location":["Vienna","Austria"],
           "language":["english"],
           "author":["Ronald Malis"]}}]}
     */

    public class TagTheNetResponse
    {
        [JsonProperty(PropertyName = "topic")]
        public string[] Topic { get; set;}

        [JsonProperty(PropertyName = "person")]
        public string[] Person { get; set; }

        [JsonProperty(PropertyName = "location")]
        public string[] Location { get; set; }

        [JsonProperty(PropertyName = "author")]
        public string[] Author { get; set; }

        [JsonProperty(PropertyName = "language")]
        public string[] Language { get; set; }

        public string[] ToStringArray()
        {
            return Extensions.ArrayConcat(',', new [] {Topic,Person,Location,Author});
        }
    }
}
